import axios from '@/libs/api.request.js'

export const getClassesList = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'classes/getClassesList'
    });
};

export const saveClasses = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'classes/saveClasses'
    });
};

export const updateClasses = data => {
    return axios.request({
        method:'post',
        data:data,
        url:'classes/updateClasses'
    });
};

export const saveOrUpdateClasses = data => {
    return data.id ? updateClasses(data) : saveClasses(data);
};


export const handleShowTeachers = data => {
    return axios.request({
        method:'get',
        data:null,
        url:`classes/handleShowTeachers/${data.id}`
    });
};

export const appointTeachers = data =>{
    return axios.request({
        method:'post',
        data:data,
        url:'classes/appointTeachers'
    });
};